// 连接数据库
module.exports = (app) => {
  const mongoose = require("mongoose");
  const path = require("path");

  mongoose.connect("mongodb://127.0.0.1:27017/node-vue-moba", {
    useNewUrlParser: true,
    useUnifiedTopology: true,
    useFindAndModify: false,
    useCreateIndex: true,
  });

  require("require-all")(path.join(__dirname, "../models"));
};
